package com.wanxi.three;

import java.util.Scanner;

public class Max {
    public static void main(String[] args) {
        Scanner scanner = new Scanner(System.in);
        System.out.println("请输入第一个数");
        int first = scanner.nextInt();
        System.out.println("请输入第二个数");
        int second = scanner.nextInt();
        System.out.println("请输入第三个数");
        int third = scanner.nextInt();
//        先将前面两个的最大值得到
        int tempMax = first > second ? first : second;
//        然后，将刚刚的最大值和第三个数再次进行比较
        int max = tempMax > third ? tempMax : third;
        System.out.println("最大值为：" + max);
    }
}
